Replace Inequality Comparison with Equality Comparison (RICEC)

Description:

The RICEC audit generates a message in situations when ranges of compared operands intersect only in one point, so the inequality comparison can be replaced with the equality comparison. Such a message can be caused by an error in the program, when the programmer has the wrong assumption about ranges of compared operands. However, even if this inequality comparison is correct, replacing it with an equality comparison can make the code easier to understand.

Incorrect:

procedure foo(i:integer);
begin
    if i >= 0 then
        if i <= 0 then
            ...
end;

Correct:

procedure foo(i:integer);
begin
    if i >= 0 then
        if i = 0 then
            ...
end;